//
//  RegisterPwdCell.m
//  CenturyCity
//
//  Created by beisheng03 on 2017/11/28.
//  Copyright © 2017年 beisheng. All rights reserved.
//

#import "RegisterPwdCell.h"

@interface RegisterPwdCell ()
@property (weak, nonatomic) IBOutlet UITextField *rightTextField;
@property (weak, nonatomic) IBOutlet UILabel *topLabel;

@end

@implementation RegisterPwdCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.rightTextField.font = MYFONT(15);
    
    self.topLabel.font = MYFONT(15);
    
    [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(textChange) name:UITextFieldTextDidChangeNotification object:self.rightTextField];
    
    
}


- (void)setModel:(RegisterInfoModel *)model{
    
    _model = model;
    
    if (_model.type != nil) {
        self.topLabel.text = @"输入新密码";
    }
    
    
    if (_model.password.length > 0) {
        
        self.rightTextField.text = _model.password;
    }
    
    
}



- (void)textChange{
    
    self.model.password = self.rightTextField.text;
    
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
